/*
** my_strstr.c for lol in /home/noret_a/
**
** Made by christophe noret
** Login   <noret_a@epitech.net>
**
** Started on  Tue Oct  9 22:31:39 2012 christophe noret
** Last update Tue Oct  9 23:40:19 2012 christophe noret
*/

char	*my_strstr(char *str, char *to_find)
{
  int	i;
  int	j;

  i = 0;
  j = 0;
  if (to_find == 0 || to_find == "")
    return (str);
  while (to_find && str && to_find[j] && str[i])
    {
      if (str[i] == to_find[j])
	j++;
      else
	j = 0;
      i++;
    }
  if (j != 0)
    return ((str + i) - j);
  else
    return (str);
}
